INIT = task_init_merge.cc
#INIT = task_init.cc
INIT_LIB = libtask_init.so

#MUL = task_mul.cc
MUL = task_mul_t.cc
MUL_LIB = libtask_mul.so

AVX = task_avx_256.cc
AVX_LIB = libtask_avx_256.so

LOOP = 100
NUM =1024

init:$(INIT)
	g++ ${INIT} -O2 -shared -fPIC  -o ${INIT_LIB}
init_run:$(INIT_LIB)
	./testApp -load ./$(INIT_LIB) -loop $(LOOP) -matrixnum $(NUM)

mul:$(MUL)
	g++ ${MUL} -O2 -fopenmp -shared -fPIC  -o ${MUL_LIB}
mul_run:$(MUL_LIB)
	./testApp -load ./$(MUL_LIB) -loop $(LOOP) -matrixnum $(NUM)

avx:$(AVX)
	g++ ${AVX} -O2 -mfma -shared -fPIC  -o ${AVX_LIB}
avx_run:$(AVX_LIB)
	./testApp -load ./$(AVX_LIB) -loop $(LOOP) -matrixnum $(NUM)

clean:
	rm -f *.so *.o

